-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[fix][proxy] Fix incorrect client error when calling get topic metadata #24181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/pulsarbot rerun-failure-checks |
I suggest you check the |
Good pointer, changed the code |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #24181 +/- ##
============================================
+ Coverage 73.57% 74.23% +0.65%
+ Complexity 32624 32508 -116
============================================
Files 1877 1865 -12
Lines 139502 144628 +5126
Branches 15299 16521 +1222
============================================
+ Hits 102638 107358 +4720
+ Misses 28908 28777 -131
- Partials 7956 8493 +537
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyTest.java
Outdated
Show resolved
Hide resolved
bfb457f
to
f787558
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java:1385
- [nitpick] The method name 'revertClientExToErrorCode' could be more descriptive. Consider renaming it to 'mapClientExceptionToServerError' for clarity.
public static ServerError revertClientExToErrorCode(PulsarClientException ex) {
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/LookupProxyHandler.java:250
- [nitpick] The variable name 'pce' could be more descriptive; consider renaming it to 'clientException' to improve readability.
PulsarClientException pce = PulsarClientException.unwrap(t);
Motivation
Proxy overwrites multiple error codes to
LookupError
, which may cause issues that many expressions, such asex instance of TopicDoesNotExistException
get afalse
result even if the broker responds aTopicDoesNotExistException
The code lines that use the expression
ex instance of TopicDoesNotExistException
Modifications
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: x